﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using TestDemo.MonitorObject;
using TestDemo.OverrideTest;

namespace TestDemo
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            MonitorTest.MainFun();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            OverRideTest overrideTest = new OverRideTest();
            overrideTest.CallName();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            Action action = () =>
            {
                string p = null;
                TestFun(p);
            };
            action?.Invoke();
        }
        public void TestFun(string p)
        {
            Debug.WriteLine(p.ToString());
        }
    }
    
}
